import { http } from '@/utils/request.js'

const caseService = {
  list: (data) => {
    return http.get('/system/patent/list', data)
  },
  update: (data) => {
    return http.put('/system/fundPool', data)
  },
  add: (data) => {
    return http.post('/system/fundPool', data)
  },
  getDetail: (zlpromptId) => {
    return http.get(`/system/fundPool/${zlpromptId}`)
  },
  delete: (id) => {
    return http.delete(`/system/fundPool/${id}`)
  },
  listBusiness: (data) =>{
    return http.get('/system/business/list',data)
  },
  EngineerList: (data) =>{
    return http.get('/system/user/getEngineer',data)
  },
  Allot: (data) =>{
    return http.post('/system/patent/allocation',data)
  },
  Audit: (data) =>{
    return http.post('/system/patent/auditPatentFile',data)
  },
  allocationBatch: (data) =>{
    return http.post('/system/patent/allocationBatch',data)
  },
  addStatusToYjj: (data) =>{
    return http.post(`/system/patent/addStatusToYjj?patentId=${data?.patentId}`)
  },
  getPatent: (patentId) =>{
    return http.get(`/system/patent/${patentId}`)
  },
  attachmentQuery: (data) =>{
    return http.get(`/system/patentFile/list`,data)
  },
  attachmentDelete: (id) =>{
    return http.delete(`/system/patentFile/${id}`)
  },
  updateFileAndInfo: (data) =>{
    return http.post(`/system/patent/updateFileAndInfo`,data)
  },
  CompanyQueryList: () =>{
    return http.get(`/system/submitCompany/queryList`)
  },
  updatePatent: (data) =>{
    return http.put(`/system/patent`,data)
  },
  auditFundPoolDetail: (data) => {
    return http.put('/system/fundPool/audit', data)
  },
  matchFundPool: ({ fundPoolIds, promptIds }) => {
    return http.put(`/system/fundPool/match/?fundPoolIds=${fundPoolIds}&promptIds=${promptIds}`)
  },
  auditPromptFundPool: (params) => {
    return http.get(`/system/fundPool/auditPrompt/${params}`)
  },
  auditFundPool: (params) => {
    return http.get(`/system/fundPool/auditFundPool/${params}`)
  },

//   matchFundPool: (fundPoolIds, promptIds) => {
//     return http.put(`/system/fundPool/match` + `?fundPoollds=${fundPoolIds}&promptlds=${promptIds}`)
//   },
}
export default caseService
